<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>标题</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/lib/layui/css/layui.css">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
<form class="layui-form searchForm" action="" style="padding:20px 0px 0px 20px">
    查询:
    <div class="layui-input-inline">
        <input style="width:200px;" type="text" name="orgName" placeholder="单位名称" autocomplete="off"
               class="layui-input">
    </div>
    <button class="layui-btn" lay-submit lay-filter="formDemo">查询</button>
    <button class="layui-btn" lay-submit lay-filter="formClear">清空</button>
</form>
<table class="layui-hide" id="dataList" lay-filter="dataList"></table>

<script type="text/javascript" src="/lib/layui/layui.js"></script>
<script src="/static/js/main.js"></script>
<script>
    var configureCom = {};
    var table = {};
    layui.use(['jquery', 'configureCom', 'configure', 'sessionFun', 'table','matchDict'], function () {
        var $ = layui.jquery;
        var configure = layui.configure;
        var matchDict = layui.matchDict;
        table = layui.table;
        var sessionFun = layui.sessionFun;
        configureCom = layui.configureCom;
        var childViewData = sessionFun.get(configure.SESSION_CHILD_VIEW_SELECT_DATA);
        //var cols = childViewData.cols;//页面传值
        var cols = [[
            {type: 'radio'},
            {field: 'orgName', title: '单位名称'},
            {field: 'creditCode', title: '统一社会信用代码'},
            {
                field: 'orgType', title: '企业类型', templet: function (d){
                    return '<p>' + matchDict.name(d.orgType,configure.MENU_ORG_TYPE) + '</p>';
                }
            }
        ]];
        configureCom.tableRender(childViewData.listUrl, {}, cols, 'dataList', 10, '', 'toolbarOrg');
        //监听搜索
        configureCom.tableSearch();
    });
    function getData(){
        return table.checkStatus('dataList').data;
    }

</script>
</body>
</html>